def recur_sum(n):
    """
    递归计算 1 + 2 + 3  + ... + n d的值
    :param n: 累加结束值
    :return:
    """
    if n != 0:
        return recur_sum(n-1) + n
    else:
        return 0

if __name__ == '__main__':
    n = 100
    result = recur_sum(n)
    print(result)
